package com.windy.app.vo;

import lombok.*;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@RequiredArgsConstructor
@Getter
public class Result<T> implements Serializable {

    private static final long serialVersionUID = 4L;

    @NonNull
    private Boolean success;

    @NonNull
    private String message;

    private T entity;

    public static Result<String> unAuthentication(String string){
        return new Result<>(false,"权限不足!",string);
    }

    public static Result<String> unAccess(String string){
        return new Result<>(false,"未认证!",string);
    }
}
